<?php


namespace app\miniapp\controller;


use app\common\controller\Api;
use app\miniapp\model\BannerModel;

class Banner extends Base
{
    protected $noNeedLogin = '*';

    //轮播图列表
    public function list()
    {
        $data = BannerModel::order('id','DESC')
            ->field('id,image')
            ->select();
        if (!$data) {
            $this->error('暂无数据');
        }
        $this->success('查询成功',[
            'image' => $data
        ]);
    }

}